package com.fhzn.boss.web.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fhzn.boss.entity.TagExtension;
import com.fhzn.boss.tools.DateTimeUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

@Accessors(chain = true)
@Data
public class TagVO {

    @Schema(description = "id")
    private Integer id;

    @Schema(description = "parent id")
    private Integer parentId;

    @Schema(description = "分类")
    private String type;

    @Schema(description = "code")
    private String code;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "所属应用")
    private String appCode;

    @Schema(description = "备注")
    private String comment;

    @Schema(description = "扩展信息")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private TagExtension extension;

    @Schema(description = "创建人")
    private String creator;

    @Schema(description = "最后一次修改人")
    private String modifier;

    @JsonFormat(pattern = DateTimeUtils.DEFAULT_DATETIME_PATTERN)
    private Date createdTime;

    @JsonFormat(pattern = DateTimeUtils.DEFAULT_DATETIME_PATTERN)
    private Date updatedTime;
}
